$INCLUDE Metacommand ---------------------------------------------------------------------------- Action Instructs the compiler to include statements from another file. Syntax 1 REM $INCLUDE. 'filespec' Syntax 2 ' $INCLUDE. 'filespec' Remarks The argument filespec is the name of a BASIC program file, which can include a path. Use single quotation marks around filespec. The metacommand $INCLUDE instructs the compiler to. - 1. Temporarily switch from processing one file. - 2. Read program statements from the BASIC file named in filespec. - 3. Return to processing the original file when the end of the included file is reached. Because compilation begins with the line immediately following the line in which $INCLUDE occurred, $INCLUDE should be the last statement on the line. For example. DEFINT I-N ' $INCLUDE. 'COMMON.BAS' When you are running a program from the QBX environment, included files must not contain SUB or FUNCTION statements. When you are compiling a program from the BC command line, included files can contain SUB or FUNCTION statements. Included files created with BASICA must be saved with the , A option. Included files created with QBX must be in a text (not binary) format. Example See the DateSerial# function programming example, which uses the $INCLUDE metacommand. The DateSerial# entry is in Part 2, "Add-On-Library Reference."